/**
 * Created by huiran on 2017/5/11.
 */
//页面滚动
document.onscroll = function () {

    if ($(window).height() + $(document).scrollTop() >= $('#guding').offset().top+810) {
        $('#guding').addClass('guding')
    }
    if ($(window).height() + $(document).scrollTop() >= $('.inde-cont1').offset().top) {
        $('.inde-cont1 .inde-cont3').css('visibility','visible').addClass('animated zoomIn');
    }
    if ($(window).height() + $(document).scrollTop() >= ($('.team ').offset().top+ 100)) {
        $('.team .inde-cont3').css('visibility','visible').addClass('animated zoomIn');
        $('#slideBox ul').css('visibility','visible').addClass('animated flipInY');
    }
    if ($(window).height() + $(document).scrollTop() >= ($('.design').offset().top+ 100)) {
        $('.design .inde-cont3').css('visibility','visible').addClass('animated zoomIn');
        if($(window).height() + $(document).scrollTop() >= ($('.yang-1').offset().top)){
            $('.yang-1').css('visibility','visible').addClass('animated zoomIn');
        }
        if($(window).height() + $(document).scrollTop() >= ($('.yang-2').offset().top)){
            $('.yang-2').css('visibility','visible').addClass('animated zoomIn');
        }
        if($(window).height() + $(document).scrollTop() >= ($('.yang-3').offset().top)){
            $('.yang-3').css('visibility','visible').addClass('animated zoomIn');
        }
        if($(window).height() + $(document).scrollTop() >= ($('.yang-4').offset().top)){
            $('.yang-4').css('visibility','visible').addClass('animated zoomIn');
        }
        if($(window).height() + $(document).scrollTop() >= ($('.yang-5').offset().top)){
            $('.yang-5').css('visibility','visible').addClass('animated zoomIn');
        }
    }

    if ($(window).height() + $(document).scrollTop() >= ($('.about').offset().top+ 300)){
        $('.about .row').css('visibility','visible').addClass('animated zoomIn');
        $('.about .row .col-md-12').css('visibility','visible').addClass('animated flipInY')
    }
    if ($(window).height() + $(document).scrollTop() >= ($('.news').offset().top + 300)){
        $('.rows .col-md-12').css('visibility','visible').addClass('animated zoomIn');
        if($(window).height() + $(document).scrollTop() >= ($('.diyi').offset().top)){
            $('.rowss .col-md-12 .news-main.diyi').css('visibility','visible').addClass('animated zoomIn');
        }
        if($(window).height() + $(document).scrollTop() >= ($('.disan').offset().top)){
            $('.news .col-md-5 .news-main.disan').css('visibility','visible').addClass('animated zoomIn');
        }
        if($(window).height() + $(document).scrollTop() >= ($('.dier').offset().top)){
            $('.rowss .col-md-12 .news-main.dier').css('visibility','visible').addClass('animated zoomIn');
        }
        if($(window).height() + $(document).scrollTop() >= ($('.disi').offset().top)){
            $('.news .col-md-5 .news-main.disi').css('visibility','visible').addClass('animated zoomIn');
        }
    }
};